package com.example.tool.util;

import android.os.Environment;

/**
 * @author by lijb on 2017/10/30.
 */

public class ValueUtils {
    public static String VIEW_TYPE = "VIEWTYPE";
    public static final String APP_ROOT_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/DongHaYunDong";
    public static final String PIC_PATH = APP_ROOT_PATH + "/head";//个人资料头像存储路径
    public static final String LOG_PATH = APP_ROOT_PATH + "/log";//日志目录

    public static final String BING_DEVICE_FLAG = "isbinded";
    public static final String BING_DEVICE_SPORT_FLAG = "isbinded_sport";
    public static final String LAST_CHECK_BLUE = "last_check_blue";
    //步数
    public static final int GET_STEP_DATA_FAIL = 1001;
    public static final int GET_STEP_DATA_SUCCESS = 1002;

    //睡眠
    public static final int GET_SLEEP_DATA_FAIL = 1003;
    public static final int GET_SLEEP_DATA_SUCCESS = 1004;

    //心率
    public static final int GET_HEART_ARTE_DATA_FAIL = 1005;
    public static final int GET_HEART_ARTE_DATA_SUCCESS = 1006;

    //心率
    public static final int GET_BLOOD_DATA_FAIL = 1007;
    public static final int GET_BLOOD_DATA_SUCCESS = 1008;

    //体重
    public static final int GET_WEIGHT_DATA_FAIL = 1009;
    public static final int GET_WEIGHT_DATA_SUCCESS = 1010;

    //运动首页
    public static final int GET_SPORT_DATA_SUCCESS = 1011;
    public static final int GET_SPORT_DATA_FAIL = 1012;
    public static final int GET_SPORT_DISTANCE_SUCCESS = 1013;
    public static final int GET_SPORT_DISTANCE_FAIL = 1014;

    //运动历史
    public static final int GET_SPORT_HISTORY_DATA_SUCCESS = 1013;
    public static final int GET_SPORT_HISTORY_DATA_FAIL = 1014;

    //运动中
    public static final int GET_SPORT_PROCESS = 1015;
    public static final int GET_SPORT_UPLOAD_SUCCESS = 1019;//上传运动历史记录成功
    public static final int GET_SPORT_UPLOAD_FAIL = 1020;

    //运动项目设置
    public static final int GET_SPORT_ITEM = 1016;
    public static final int SET_SPORT_ITEM = 1017;
    public static final int SET_SPORT_ITEM_FAIL = 1021;
    public static final int GET_SPORT_ITEM_CHOSE = 1018;

    //获取运动设置类型
    public static final int GET_SPORT_ITEM_TYPE = 1020;

    //关于我们 用户协议url
    public static final String ABOUT_US_URL = "http://119.23.239.138:8080/prd/dongha/about.html";
    public static final String USER_PROTOCOL_URL = "http://119.23.239.138:8080/prd/dongha/userAgreement.html";

    //绑定设备成功后，广播通知绑定的其它页面销毁
    public final static String BIND_SUCCESS_ACTIVITY_FINISH = "BIND_SUCCESS_ACTIVITY_FINISH";

    //绑定页面，页面的进入方式，区分登录后进入，或酷玩页面进入  0为从登录页进入，1为从应用内进入
    public final static String ACTIVITY_IN_TYPE = "ACTIVITY_IN_TYPE";

    public static final String IS_FIRST_LOGIN = "IS_FIRST_LOGIN";
    public static final String IS_FIRST_START = "IS_FIRST_START";

    //设备重启
    public static final int RESTART_RESULT = 110;

    //设备解绑
    public static final int UNBIND_RESULT = 111;
    //隐藏运动模式
    public static final int HIDE_SPORT_RESULT = 112;
    //运动结束
    public static final int HIDE_SPORT_RESULT_FINISH = 113;

    //酷玩页进入绑定设备，暂不绑定时的返回码
    public static final int NOT_BOUND_RESULT = 114;

    //忘记密码界面进入验证手机，验证成功通知前面页面销毁
    public final static String VERIFICATION_PHONE_SUCCESS_ACTIVITY_FINISH = "VERIFICATION_PHONE_SUCCESS_ACTIVITY_FINISH";

    //设置是否添加了日历，以便列表界面刷新
    public static final String ADD_CALENDAR_FLAG = "ADD_CALENDAR_FLAG";

    //设置是否添加了日历，以便日历界面刷新
    public static final String ADD_CALENDAR_MONTH_FLAG = "ADD_CALENDAR_MONTH_FLAG";

    //语音开关
    public static final String SPORT_VOICE_SWITCH = "SPORT_VOICE_SWITCH";

    //运动中是否自动暂停开关，此只保存轨迹运动的设置，非轨迹的不参与保存
    public static final String SPORT_AUTO_PAUSE_SWITCH = "SPORT_AUTO_PAUSE_SWITCH";

    //语音性别
    public static final String SPORT_VOICE_SEX = "SPORT_VOICE_SEX";
    //sos定位开关
    public static final String SOS_ON_OFF = "SOS_ON_OFF";

    //语音提示类型，0：按公里，1：按分钟
    public static final String SPORT_VOICE_TYPE = "SPORT_VOICE_TYPE";
    //语音类型值
    public static final String SPORT_VOICE_TYPE_VALUE = "SPORT_VOICE_TYPE_VALUE";
    //语音频率距离
    public static final String SPORT_VOICE_DISTANCE_RATE = "SPORT_VOICE_DISTANCE_RATE";

    //语音频率时间
    public static final String SPORT_VOICE_TIME_RATE = "SPORT_VOICE_TIME_RATE";

    //保存连接设备的信息
    public static final String IS_BIND_DEVICE_INFOMATION = "IS_BIND_DEVICE_INFOMATION";

    //绑定了新设备后，允许app存储刚绑定过的手环信息，上传服务器
    public static final String IS_ALLOW_SAVE_DEVICE_INFO = "IS_ALLOW_SAVE_DEVICE_INFO";

    //绑定了新设备后，允许上传访问日志
    public static final String IS_ALLOW_UPLOAD_ACCESS_LOG = "IS_ALLOW_UPLOAD_ACCESS_LOG";
    public static final String USER_SPORT_DATA_DISTANCE = "USER_SPORT_DATA_DISTANCE";
    //运动目标类型
    public static final String USER_SPORT_TARFET_TYPE = "USER_SPORT_TARFET_TYPE";
    //运动目标值数据
    public static final String USER_SPORT_TTYPE_VALUE = "USER_SPORT_TTYPE_VALUE";
    //计划任务设置目标值
    public static final String PLAY_SPORT_TTYPE_VALUE = "PLAY_SPORT_TTYPE_VALUE";
    //计划任务设置目标类型
    public static final String PLAY_TARGET_SPORT_TTYPE = "PLAY_TARGET_SPORT_TTYPE";
    //计划任务设置提交计划时是否覆盖的计划次数
    public static final String PLAY_SPORT_TTYPE_COVER_COUNT = "PLAY_SPORT_TTYPE_COVER_COUNT";

    public static final int MESSAGE_SPORT_END_TIPS = 8008;
    public static final int MESSAGE_SPORT_END = 8009;
    public static final int MESSAGE_SPORT_SHOW_DIALOG = 8010;
    public static final int MESSAGE_SPORT_SHOW_DISMISS_DIALOG = 8011;
    public static final int MESSAGE_SPORT_END_NEXT_PAGE = 8012;

    /**
     * 身高常量值，单位：厘米
     * 身高的最小值，最大值，默认值
     */
    public static class HeightConstant {
        public static final int MIN = 30;//最小身高
        public static final int MAX = 271;//最大身高
        public static final int INIT = 170;//默认初始值
    }

    /**
     * 体重常量值，单位：公斤
     * 体重的最小值，最大值，默认值
     */
    public static class WeightConstant {
        public static final float MIN = 5;//最小体重
        public static final float MAX = 600;//最大体重
        public static final float INIT = 65;//默认初始值
    }

    /**
     * 心率区间的范围，单位：无
     */
    public static class HeartConstant {
        public static final int MIN = 100;//最小心率区间
        public static final int MAX = 220;//最大心率区间
    }

    /**
     * 运动时长的常量值，单位：分钟
     */
    public static class TimeConstant {
        public static final float MIN = 30;//最小时长
        public static final float MAX = 1440;//最大时长
        public static final float INIT = 60;//默认初始值
        public static final float PER = 5;//间隔
    }

    /**
     * 运动距离常量，单位：公里
     */
    public static class DisanceConstant {
        public static final float MIN = 1;//最小时长
        public static final float MAX = 100;//最大时长
        public static final float INIT = 5;//默认初始值
        public static final float PER = 0.5f;//间隔
    }

    public static final String DFU_RED_POINT = "DFU_RED_POINT";//dfu升级红点
    public static final String DFU_DOWN_URL = "DFU_DOWN_URL";//dfu下载url
    public static final String DFU_UPDATE_VERSION = "DFU_UPDATE_VERSION";//dfu固件新版本
    public static final String DFU_FIRMWARE_ID = "DFU_FIRMWARE_ID";//dfu id
    public static final String DFU_UPDATE_ID = "DFU_UPDATE_ID";//dfu固件状态更新id
    /**
     * 固件升级失败的原因
     */
    public static final String BLUE_ERROR = "blueError";
    public static final String FILE_ERROR = "fileError";
    public static final String NOT_FIND_DEVICE = "notFindDevice";
    public static final String UPDATE_MODEL_FAIL = "updateModelFail";
    public static final String CONFIG_PARAS_ERROR = "configParasError";
    public static final String OTHER_ERROR = "otherError";

    /*运动历史，tab标签顺序保存*/
    public static final String KEY_HISTORY_TAB_ORDER = "HISTORY_TAB_ORDER";
    //健康统计的bar的固定高度
    public static final int BAR_MEASURE_HEIGHT = 240;
    //健康统计完成任务无数据
    public static final String BAR_TASK_FINISH = "{\"sleep\":{\"totalGt6h\":0,\"count\":0,\"before24\":0,\"deepGt1_5h\":0}," +
            "\"body\":{\"uploadData\":0,\"openApp\":0,\"count\":0,\"weight\":0,\"blood\":0,\"heartRateNormal\":0}," +
            "\"sport\":{\"totalTimeGt30m\":0,\"count\":0,\"stepGt10k\":0,\"stepGt3k\":0}}";
    //bar一天的总分数
    public static final float BAR_TOTAL_SAORE = 1100f;
    public static final float BAR_SPORT_SAORE = 450f;
    public static final float BAR_SLEEP_SAORE = 300f;
    public static final float BAR_BODY_SAORE = 350f;
    //固定的字符串
    public static final String COUNT_ITEM_OPEN_APP = "每日打开APP";
    public static final String COUNT_ITEM_SYNC_DAY = "每日同步手环数据";
    public static final String COUNT_ITEM_RECORD_WEIGHT = "记录体重";
    public static final String COUNT_ITEM_CALM_HEART = "静息心率";
    public static final String COUNT_ITEM_MEASURE_BLODD = "测量血压";
    public static final String COUNT_ITEM_STEP_3K = "步数达到3000步";
    public static final String COUNT_ITEM_STEP_10K = "步数达到10000步";
    public static final String COUNT_ITEM_STEP_30MIN = "运动30分钟以上";
    public static final String COUNT_ITEM_BEFORE_24 = "早睡觉";
    public static final String COUNT_ITEM_SLEEP_6H = "有充足的睡觉";
    public static final String COUNT_ITEM_SLEEP_DEEP = "有较高睡眠质量";


}
